import React, { useState, useCallback, useEffect } from 'react'; 
import Captcha from 'react-captcha-code';

function Tlogin() { 
  const [captchaKey, setCaptchaKey] = useState(0); 
  const handleClick = useCallback((captcha) => {
    console.log('captcha:', captcha); 
  }, []);

  return ( 
    <Captcha key={captchaKey} charNum={4} onChange={handleClick} />
  );
}

export default Tlogin;
